import request from '@/utils/request'

export function getCategory(id) {
    return request({
        url: `/productCategory/list/${id}`,
        method: 'post'
    });
};

export function createCategory(query) {
    return request({
        url: '/productCategory/create',
        method: "POST",
        data: query
    })
}


export function updateCategory(id, query) {
    return request({
        url: `/productCategory/update/${id}`,
        method: "POST",
        data: query
    })
}

export function findOfCategory(id) {
    return request({
        url: `/productCategory/${id}`,
        method: "GET",
    })
}

export function deleteCategory(id) {
    return request({
        url: `/productCategory/delete/${id}`,
        method: "POST"
    })
}